// 封装本地存储

// 存
export const setItem = (name, data) => {
    localStorage.setItem(name, JSON.stringify(data))
}

// 取
export const getItem = (name) => {
    return JSON.parse(localStorage.getItem(name))
}

// 删
export const delItem = (name) => {
    localStorage.removeItem(name)
}